package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestcaseCancel;
import com.estar.assistsurvy.entity.ResponseMsg;

import android.content.Context;
import android.os.Handler;

public class CaseCancelThread extends BaseThread {

	private RequestcaseCancel caseCancel;

	public CaseCancelThread(Context context, Handler handler, RequestcaseCancel caseCancel) {
		super(context, handler);
		this.caseCancel = caseCancel;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		url_str=Constants.NAMESPACE+Constants.CASE_CANCEL;
		json=gson.toJson(caseCancel);
		postRequest(url_str, json);
		if(result!=null){
			ResponseMsg message=new ResponseMsg();
			message=gson.fromJson(result, ResponseMsg.class);
			msg.what=0;
			msg.obj=message;
			msg.sendToTarget();
		}
	}
}
